package cz.spock.core.entity.security;

import javax.persistence.Entity;
import javax.persistence.Id;

import org.springframework.security.core.GrantedAuthority;

/**
 * Spring security GrantedAuthority implementation
 * 
 * @author miso
 *
 */
@Entity
@SuppressWarnings("serial")
public class SpockGrantedAuthority implements GrantedAuthority {
    
    @Id
    private Long id;
    
    private String role;

    //TODO what should be returned?
    public String getAuthority() {      
        return role;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

}
